<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,maximum-scale=1.0" />
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/public.js" type="text/javascript" charset="utf-8"></script>
    <title>修改昵称</title>
</head>
<body>
	<div id="nickname">
		<div class="nickHead">
			<img class="back" src="images/back.png"/>
			<span class="title">修改昵称</span>
			<span class="nickBtn" onclick="pub()">保存</span>
		</div>
		<div class="nameTxt">
			<input type="text" name="name" id="name" value="" />
			<img class="del" src="images/Cancel_Small@2x.png"/>
		</div>
		<span class="nameTips">12个字以内，可使用数字、汉子、字母组合</span>
	</div>
<script type="text/javascript">
	$('#name').on('input propertychange',function(){
		if($(this).val()!==''){
			$('.del').show()
		}else{
			$('.del').hide()
		}
	})
	$('.del').on('click',function(){
		$('#name').val('')
		$(this).hide()
	})
</script>
</body>
</html>
